package com.stock.service.impl;

import com.stock.entity.NewStockDataEntity;
import com.stock.service.IAdminService;
import com.stock.service.IStockDataService;
import com.stock.service.IStockHistoryDataService;
import com.stock.service.IStockProfitDataService;
import org.springframework.stereotype.Service;

@Service
public class AdminService implements IAdminService {

    private final IStockDataService stockDataService;

    private final IStockHistoryDataService stockHistoryDataService;

    private final IStockProfitDataService stockProfitDataService;

    public AdminService(IStockDataService stockDataService, IStockHistoryDataService stockHistoryDataService, IStockProfitDataService stockProfitDataService) {
        this.stockDataService = stockDataService;
        this.stockHistoryDataService = stockHistoryDataService;
        this.stockProfitDataService = stockProfitDataService;
    }

    @Override
    public boolean setNewStockData(NewStockDataEntity entity) {
        return stockDataService.setNewStockData(entity);
    }

    @Override
    public boolean initHistoryStockData() {
        return stockHistoryDataService.initHistoryStockData();
    }

    @Override
    public boolean initStockProfitData() {
        return stockProfitDataService.initStockProfitData();
    }

}
